/*

 $Id: $

*/

BEGIN;


/*
	Table: 'phpbb_link'
*/
CREATE TABLE phpbb_link (
	id varchar(32) DEFAULT '0' NOT NULL,
	url varchar(255) DEFAULT '0' NOT NULL,
	forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0),
	post_id INT4 DEFAULT '0' NOT NULL CHECK (post_id >= 0)
);

CREATE INDEX phpbb_link_id ON phpbb_link (id);

/*
	Table: 'phpbb_cryptlink_data'
*/
CREATE TABLE phpbb_cryptlink_data (
	link_id varchar(32) DEFAULT '0' NOT NULL,
	user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
	referer varchar(4000) DEFAULT '0' NOT NULL
);

CREATE INDEX phpbb_cryptlink_data_link_id ON phpbb_cryptlink_data (link_id);
CREATE INDEX phpbb_cryptlink_data_user_id ON phpbb_cryptlink_data (user_id);


COMMIT;